<!--sidebar start-->
{{ $currentNode := . }}
{{ if .Scratch.Get "sidemenu" }} 
<div class="col-lg-2 col-md-3 col-sm-4">
    <aside>
        <nav class="secondary">
            <!-- sidebar menu start-->
            {{ $section := .Scratch.Get "sidemenu_section" }}
            {{ range .Site.Menus.main }}
                {{ if eq $section (.Name | lower) }}
                    {{ if .HasChildren }}
                        <h3>{{ .Name }}</h3>
                        <div class="list-unstyled side-links list-group">
                            {{ range .Children }}
                                <a class="list-group-item list-group-item-action{{ if $currentNode.IsMenuCurrent "main" . }} active{{ end }}" href="{{ .URL }}">{{ .Name }}</a>
                            {{ end }}
                        </div>
                    {{end}}
                {{end}}
            {{end}}
            <!-- sidebar menu end-->
        </nav>
    </aside>
</div>
{{end}}
<!--sidebar end-->
